The <form> tag is used to create an HTML form for user input. The most important form element is the input element. The input element is used to select user information.

An input element can vary in many ways, depending on the type attribute. An input element can be of type text field, checkbox, password, radio button, submit button, and more. The most used input types are described below.  

Text Field

<input type="text" /> defines a one-line input field that a user can enter text into: HTML code


Example
<html> <head> <title>Creative Mission-Web Development & research center</title> </head> <body > <center> <h3>Welcome to Creative Mission</h3> <form> Name: <input type="text" name="firstname" /><br /> </form> </center> </body> </html>

Output

Creative Mission-Web Development & research center

Welcome to Creative Mission

Name:
 

Radio Buttons

 

<input type="radio" /> defines a radio button. Radio buttons let a user select ONLY ONE of a limited number of choices:




Example
<html> <head> <title>Creative Mission-Web Development & research center</title> </head> <body > <center> <h3>Welcome to Creative Mission</h3> <form> <input type="radio" name="" value="net" />Networking &nbsp; <input type="radio" name="" value="web" />Programming </form> </center> </body> </html>
 

Output

 
Creative Mission-Web Development & research center

Welcome to Creative Mission

Networking   Programming


All Tutorial => 123456789101112131415





Write Comment